<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 基本表单</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link href="/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <script type="text/javascript" src="/Public/js/icallcenter/global.js"></script>
    <script type="text/javascript" src="/Public/hojo/hojo.js" djConfig="isDebug:false, parseOnLoad:false"></script>
    <script>
        hojo.registerModulePath("icallcenter", "../js/icallcenter");
        hojo.require("icallcenter.logon");
        hojo.require("hojo.io.script");

    </script>
    <style>
        .l_width {
            width: 150px;
            margin-top: 7px;
        }
        .project-people, .project-actions {
            text-align: left;
            vertical-align: middle;
        }

        .label_contact {
            position: relative;
            color: #2a2c2e;
            margin-left: 30px;
            margin-top: 7px;
        }



        .back_on_list{
            border: 1px  solid #6254B2;
            padding: 5px;
            background-color: #6254B2;
            color: white;
            border-radius: 4px ;
            margin: 10px 0px 5px 10px;
        }

        .kf_function{
            display: flex;
            /*text-align: center;*/
            border: 1px  dotted #c3c3c3;
            padding: 12px;
            color: white;
            font-size: 16px;
            /*border-radius: 2px 2px 5px 2px ;*/
            width: 60%;
            height: 100px;
            margin: 0 0 1% 10%;
        }

        .kf_functions{
            display: inline-flex;
            text-align: center;
            border: 1px  dotted #c3c3c3;
            padding: 12px;
            color: white;
            font-size: 16px;
            /*border-radius: 2px 2px 5px 2px ;*/
            width: 25%;
            height: 70px;
            margin: 0 0 1% 10%;

        }
        .top_distance{
           margin-top: 20px;
        }
    </style>
</head>
<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">

                    <div class="kf_functions">
                        <a  onclick="back_list()" class="back_on_list">返回</a>
                        <if condition="$type eq 1">
                            <a class="back_on_list" onclick="survey_finish()"> 调查完成</a>
                        </if>
                        <a href="<{$SRVER_NAME}>/admin.php/UserQuotaSurvey/list_details?vid=<{$user.vid}>&type=<{$type}>" class="back_on_list" >沟通详情</a>
                        <if condition="$role eq 11">
                            <a href="#" class="back_on_list" onclick="call_phone()">外呼</a>
                        </if>
                    </div>
                    <form method="post" class="form-horizontal" onsubmit="return false" class="form_style">

                        <div class="form-group top_distance">
                            <label class="col-sm-2 control-label">人脸照片</label>
                            <div class="col-sm-10 project-people" style="display: inline-block;">
                                <div class="user_box">

                                    <a href="<{$user_pic.photo}>" class="img_link" data-rel="colorbox"> <img
                                            src="<{$user_pic.photo}>" height="165" width="150"/></a>

                                    <if condition="$user_pic.photo1 neq ''">
                                        <a href="<{$user_pic.photo1}>" class="img_link" data-rel="colorbox"> <img
                                                src="<{$user_pic.photo1}>" height="165" width="150"/></a>
                                    </if>
                                    <if condition="$user_pic.photo2 neq ''">
                                        <a href="<{$user_pic.photo2}>" class="img_link" data-rel="colorbox"> <img
                                                src="<{$user_pic.photo2}>" height="165" width="150"/></a>
                                    </if>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">身份证照</label>
                            <div class="col-sm-10 project-people" style="display: inline-block;">
                                <a href="<{$user_pic.behind}>" class="img_link" data-rel="colorbox"> <img
                                        src="<{$user_pic.behind}>"
                                        height="183" width="284"/></a>
                                <a href="<{$user_pic.front}>" class="img_link" data-rel="colorbox"> <img
                                        src="<{$user_pic.front}>" height="183" width="284"/></a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">手机号码</label>
                            <div class="col-sm-10">
                                <input class="form-control" type="text" placeholder="身份证号" id="id_phone"
                                       value="<{$user.mobile}>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">身份证号</label>
                            <div class="col-sm-10">
                                <input class="form-control" type="text" placeholder="身份证号" id="id_card"
                                       value="<{$user.id_card}>">
                            </div>
                        </div>
                 <div class="form-group">
                            <label class="col-sm-2 control-label">现居住地址</label>
                            <div class="col-sm-10">
                                <input class="form-control" type="text" placeholder="请输入居住地址" id="live_address"
                                       value="<{$user.address}>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">信用评分</label>
                            <div class="col-sm-10">
                                <input class="form-control" type="text" placeholder="请输入居住地址" value="<{$user.score}>">
                            </div>
                        </div>
                        <div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" style="color: #2a2c2e">紧急联系1:</label>
                                <input id="relative_name" class="l_width" value="<{$user_contact.relative_name}>" />
                                <label class="label_contact">紧急联系号码:</label>
                                <input id="relative_mobile"  class="l_width" value="<{$user_contact.relative_mobile}>"/>
                                <label class="label_contact">关系:</label>
                                <input id="r_type"  class="l_width" value="<{$user_contact.r_type}>"/>
                                <label class="label_contact">通话次数:</label>
                                <label class="l_width"><{$user_contact.contact_sum}></label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" style="color: #2a2c2e">紧急联系2:</label>
                                <input id="other_name" class="l_width" value="<{$user_contact.other_name}>"/>
                                <label class="label_contact">紧急联系号码:</label>
                                <input id="other_mobile"  class="l_width" value="<{$user_contact.other_mobile}>"/>
                                <label class="label_contact">关系:</label>
                                <input id="f_type" class="l_width" value="<{$user_contact.f_type}>"/>
                                <label class="label_contact">通话次数:</label>
                                <label class="l_width"><{$user_contact.contact_sum2}></label>
                            </div>
                            <hr>
                            </br>
                            <div class="form-group">
                                <span class="col-sm-2 control-label"><a onclick="verify(2)">工作认证：</a><{$user.work_verify}></span>
                                <span class="col-sm-2 control-label"><a onclick="verify(1)">社保认证：</a><{$user.shebao_verify}></span>
                                <span class="col-sm-2 control-label"><a onclick="verify(3)">淘宝认证：</a><{$user.taobao_verify}></span>
                                <span class="col-sm-2 control-label"><a onclick="verify(4)">京东认证：</a><{$user.jd_verify}></span>
                            </div>
                            <div class="form-group">
                                <span class="col-sm-2 control-label"><a onclick="verify(5)">信用卡认证：</a><{$user.credit_verify}></span>
                                <span class="col-sm-2 control-label"><a onclick="verify(6)">学历认证：</a><{$user.edu_verify}></span>
                                <span class="col-sm-2 control-label"><a onclick="verify(7)">支付宝认证：</a><{$user.alipay_verify}></span>
                            </div>
                        </div>
                        <!--<div style="margin-left: 60%;"><span  class="back_on_list" onclick="edit_contanct()">修改紧急联系</span></div>-->
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>



<!-- 全局js -->
<script src="/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/js/bootstrap.min.js?v=3.3.6"></script>
<!-- 自定义js -->
<script src="/Public/js/content.js?v=1.0.0"></script>
<script src="/Public/admin/js/plugins/fancybox/jquery.fancybox.js"></script>
<script src="/Public/admin/js/plugins/jquery.colorbox-min.js"></script>
<script src="/Public/admin/js/plugins/layer/layer.min.js"></script>
<script src="/Public/admin/js/layer/layer.js"></script>
<script src="/Public/admin/js/layui/layui.js"></script>
<script>
    var vid="<{$vid}>";
    //认证
    function verify(type){
        var url="";
        switch (type){
            case 1: //社保认证
//                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

            case 2: //工作认证
                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

            case 3: //淘宝认证
//                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

            case 4: //京东认证
//                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

            case 6: //学历认证
//                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

            case 7: //支付宝认证
//                url='<{$SRVER_NAME}>/admin.php/UserInfo/work_cert.html?vid='+vid;
                break;

        }
        layer.open({
            title:'认证信息',
            type: 2,
            area: ['80%', '80%'],
            maxmin: true,
            offset:'100px',
            content: url,
            success: function(layero){
                layero.find('.layui-layer-min').remove();
            }
        });
    }

    function call_phone() {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        var mobile="<{$user.mobile}>";
        var url= "<{$SRVER_NAME}>/admin.php/AntiUser/call";
        console.log('mobile000',mobile);

        layer.alert("确认外呼", {title: '提示框', icon: 3}, function (index) {
            $.post(url, {phone: mobile}, function (data) {
                console.log('1111111',data);
                layer.close(index);
            });
            layer.close(index);
        });
        layer.close(index);
    }

    console.log('90900',vid);
    //提交审核
    function commit_check() {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        var page_first="<{$page_first}>";
//        var type1="<{$url_type}>";
        var page="<{$page}>";
        var url= "<{$SRVER_NAME}>/admin.php/AntiUser/commit_check";
        var to_url= "<{$SRVER_NAME}>/admin.php/AntiUser/anti_user_list?page_first="+page_first+"&page="+page;
        layer.alert("确认提交？", {title: '提示框', icon: 3}, function () {
            $.post(url, {vid: vid}, function (data) {
                console.log('1111',vid);
                if (data.code == "1001") {
                    layer.alert(data.result, {title: '提示框', icon:1}, function () {
                        layer.close(index);
                        window.location.href=to_url;
                    });
                }
                else {
                    layer.alert(data.result, {title: '提示框', icon: 2});
                    layer.close(index);
                }
            });
        });
        layer.close(index);
    }

    function back_list() {
        var page_first = "<{$page_first11}>";
        var type1 = "<{$type}>";
        var page = "<{$page11}>";
        var url_type_status = "<{$url_type_status}>";
        var to_url = "<{$SRVER_NAME}>/admin.php/UserQuotaSurvey/cert_user_list?page_first=" + page_first + "&page=" + page + "&type=" + type1;
        window.location.href=to_url;
    }

    //完成调查
    function survey_finish(){
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        layer.alert("确认完成！", {title: '提示框', icon: 3},function (index) {
            $.post("<{$SRVER_NAME}>/admin.php/UserQuotaSurvey/survey_finish",{vid:vid},function (data) {
                if(data.code=='1001'){
                    layer.alert("修改成功！", {title: '提示框', icon: 1});
                }else {
                    layer.alert("修改失败！", {title: '提示框', icon: 2});
                }
            });
            layer.close(index);
        });
        layer.close(index);

    }

    jQuery(function ($) {
        colorbox_params = {
            reposition: true,
            scalePhotos: true,
            scrolling: false,
            previous: '<i class="fa fa-chevron-left"></i>',
            next: '<i class="fa fa-chevron-right"></i>',
            close: '&times;',
            current: '{current} of {total}',
            maxWidth: '80%',
            maxHeight: '80%',
            onOpen: function () {
                document.body.style.overflow = 'hidden';
            },
            onClosed: function () {
                document.body.style.overflow = 'auto';
            },
            onComplete: function () {
                $.colorbox.resize();
            }
        };
        $('.Info_style [data-rel="colorbox"]').colorbox(colorbox_params);
        $('.project-people [data-rel="colorbox"]').colorbox(colorbox_params);
        $("#cboxLoadingGraphic").append("<i class='icon-spinner orange'></i>");

    });



</script>
</body>
</html>
